BrightChamps Logo
Login

Summarize this article:

Live Math Learners Count Icon102 Learners

Last updated on September 15, 2025

Derivative of x|x|

Professor Greenline Explaining Math Concepts

We use the derivative of x|x|, which is |x| + x * (d/dx |x|), as a measuring tool for how the function changes in response to a slight change in x. Derivatives help us calculate profit or loss in real-life situations. We will now talk about the derivative of x|x| in detail.

Derivative of x|x| for US Students
Professor Greenline from BrightChamps

What is the Derivative of x|x|?

We now understand the derivative of x|x|. It is represented as d/dx (x|x|) and its value is |x| + x * (d/dx |x|). The function x|x| has a clearly defined derivative, indicating it is differentiable except at x = 0. The key concepts are mentioned below:

 

Absolute Value Function: |x|.

 

Piecewise Definition: |x| is defined as x for x ≥ 0 and -x for x < 0.

 

Derivative of Absolute Value: d/dx |x| = x/|x| for x ≠ 0.

Professor Greenline from BrightChamps

Derivative of x|x| Formula

The derivative of x|x| can be denoted as d/dx (x|x|).

 

The formula we use to differentiate x|x| is: d/dx (x|x|) = |x| + x * (d/dx |x|) = 2x for x > 0 and 0 for x < 0.

 

The formula applies to all x except x = 0, where |x| changes from negative to positive.

Professor Greenline from BrightChamps

Proofs of the Derivative of x|x|

We can derive the derivative of x|x| using proofs. To show this, we will use the piecewise definition of |x| along with the rules of differentiation. There are several methods we use to prove this, such as:

 

  1. By First Principle
  2. Using Chain Rule
  3. Using Piecewise Differentiation

 

We will now demonstrate that the differentiation of x|x| results in 2x for x > 0 and 0 for x < 0 using the above-mentioned methods:

 

By First Principle

 

The derivative of x|x| can be proved using the First Principle, which expresses the derivative as the limit of the difference quotient.

 

To find the derivative of x|x| using the first principle, we will consider f(x) = x|x|. Its derivative can be expressed as the following limit. f'(x) = lim(h→0) [f(x + h) - f(x)] / h

 

Given that f(x) = x|x|, we write f(x + h) = (x + h)|x + h|.

 

Substituting these into the equation, f'(x) = lim(h→0) [(x + h)|x + h| - x|x|] / h For x > 0, |x| = x, hence |x + h| = x + h

 

when h is small and positive. f'(x) = lim(h→0) [(x + h)(x + h) - x²] / h = lim(h→0) [x² + 2xh + h² - x²] / h = lim(h→0) [2xh + h²] / h = lim(h→0) [2x + h] = 2x For x < 0, |x| = -x,

 

hence |x + h| = -(x + h) when h is small. f'(x) = lim(h→0) [-(x + h)(x + h) - (-x)x] / h = lim(h→0) [-x² - 2xh - h² + x²] / h = lim(h→0) [-2xh - h²] / h = lim(h→0) [-2x - h] = 0 Hence, proved.

 

Using Chain Rule

 

To prove the differentiation of x|x| using the chain rule, We use the formula: x|x| = x * (x for x ≥ 0 and -x for x < 0) Consider f(x) = x and g(x) = |x|

 

By product rule: d/dx [f(x)g(x)] = f'(x)g(x) + f(x)g'(x) Let’s substitute f(x) = x and g(x) = |x| d/dx (x|x|) = 1 · |x| + x · (d/dx |x|) For x > 0, |x| = x and d/dx |x| = 1,

 

hence d/dx (x|x|) = x + x · 1 = 2x For x < 0, |x| = -x and d/dx |x| = -1, hence d/dx (x|x|) = -x + x · (-1) = 0

 

Using Piecewise Differentiation

 

We will now prove the derivative of x|x| using piecewise differentiation: Here, we use the formula, x|x| = { x², for x ≥ 0 -x², for x < 0 }

 

Differentiate each piece: For x ≥ 0: d/dx (x²) = 2x For x < 0: d/dx (-x²) = 0 Thus, d/dx (x|x|) = { 2x, for x > 0 0, for x < 0 }

Professor Greenline from BrightChamps

Higher-Order Derivatives of x|x|

When a function is differentiated several times, the derivatives obtained are referred to as higher-order derivatives. Higher-order derivatives can be a little tricky.

 

To understand them better, think of a car where the speed changes (first derivative) and the rate at which the speed changes (second derivative) also changes. Higher-order derivatives make it easier to understand functions like x|x|.

 

For the first derivative of a function, we write f′(x), which indicates how the function changes or its slope at a certain point. The second derivative is derived from the first derivative, which is denoted using f′′(x). Similarly, the third derivative, f′′′(x) is the result of the second derivative and this pattern continues.

 

For the nth Derivative of x|x|, we generally use fⁿ(x) for the nth derivative of a function f(x) which tells us the change in the rate of change, continuing for higher-order derivatives.

Professor Greenline from BrightChamps

Special Cases:

When x = 0, the derivative is undefined because |x| is non-differentiable at 0. When x > 0, the derivative of x|x| = 2x. When x < 0, the derivative of x|x| = 0.

Max Pointing Out Common Math Mistakes

Common Mistakes and How to Avoid Them in Derivatives of x|x|

Students frequently make mistakes when differentiating x|x|. These mistakes can be resolved by understanding the proper solutions. Here are a few common mistakes and ways to solve them:

Mistake 1

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Not simplifying the equation

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Students may forget to simplify the equation, which can lead to incomplete or incorrect results. They often skip steps and directly arrive at the result, especially when solving using piecewise differentiation. Ensure that each step is written in order. Students might think it is awkward, but it is important to avoid errors in the process.

Mistake 2

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Forgetting the Non-differentiable Point of x|x|

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

They might not remember that x|x| is undefined at x = 0. Keep in mind that you should consider the domain of the function that you differentiate. It will help you understand that the function is not differentiable at this point.

Mistake 3

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Incorrect use of Chain Rule

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

While differentiating functions such as x|x|, students misapply the chain rule. For example: Incorrect differentiation: d/dx (x|x|) = x. Correct approach: d/dx (x|x|) = |x| + x * (d/dx |x|) = 2x for x > 0, 0 for x < 0. To avoid this mistake, write the chain rule without errors. Always check for errors in the calculation and ensure it is properly simplified.

Mistake 4

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Not considering Piecewise Differentiation

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

There is a common mistake where students forget to apply piecewise differentiation for x|x|. For example, they incorrectly write d/dx (x|x|) = 2x for all x. Students should check the definition of |x| and ensure they apply the correct differentiation rules for each piece. For e.g., the correct equation is d/dx (x|x|) = 2x for x > 0 and 0 for x < 0.

Mistake 5

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Not Applying the First Principle

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Students often forget to use the first principle. This happens when they do not consider the limit definition of the derivative. For example: Incorrect: d/dx (x|x|) = 0 at x = 0. To fix this error, students should apply the first principle to understand the behavior at x = 0 and recognize the non-differentiability.

arrow-right
Max from BrightChamps Saying "Hey"
Hey!

Examples Using the Derivative of x|x|

Ray, the Character from BrightChamps Explaining Math Concepts
Max, the Girl Character from BrightChamps

Problem 1

Calculate the derivative of (x|x| + x²)

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

Here, we have f(x) = x|x| + x².

 

Using the sum rule, f'(x) = d/dx (x|x|) + d/dx (x²) For x > 0, d/dx (x|x|) = 2x and d/dx (x²) = 2x, f'(x) = 2x + 2x = 4x For x < 0, d/dx (x|x|) = 0 and d/dx (x²) = 2x, f'(x) = 0 + 2x = 2x

 

Thus, the derivative of the specified function is 4x for x > 0 and 2x for x < 0.

Explanation

We find the derivative of the given function by dividing it into parts. The first step is finding the derivative of each part and then combining them using the sum rule to get the final result.

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 2

A car's speed is modeled by the function v = x|x| where v represents velocity and x is time in seconds. If x = 2 seconds, find the acceleration of the car.

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

We have v = x|x| (velocity of the car)...(1)

 

Now, we will differentiate the equation (1) Take the derivative of x|x|: dv/dx = |x| + x * (d/dx |x|) For x > 0, |x| = x and (d/dx |x|) = 1, dv/dx = x + x * 1 = 2x

 

Given x = 2 seconds, substitute this into the derivative, dv/dx = 2 * 2 = 4

 

Hence, we get the acceleration of the car at time x = 2 seconds as 4 m/s².

Explanation

We find the acceleration of the car at x = 2 seconds as 4 m/s², which means that at this point, the velocity of the car is increasing at a rate of 4 meters per second squared.

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 3

Derive the second derivative of the function y = x|x|.

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

The first step is to find the first derivative, dy/dx = |x| + x * (d/dx |x|) For x > 0, dy/dx = 2x For x < 0, dy/dx = 0

 

Now we will differentiate to get the second derivative: d²y/dx² = d/dx (2x) for x > 0 = 2 d²y/dx² = d/dx (0) for x < 0 = 0

 

Therefore, the second derivative of the function y = x|x| is 2 for x > 0 and 0 for x < 0.

Explanation

We use the step-by-step process, where we start with the first derivative. Then, we differentiate based on the piecewise definition to find the second derivative.

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 4

Prove: d/dx ((x|x|)²) = 4x² for x > 0, 0 for x < 0

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

Let’s start using the chain rule: Consider y = (x|x|)²

 

To differentiate, we use the chain rule: dy/dx = 2(x|x|) * d/dx (x|x|) For x > 0, d/dx (x|x|) = 2x dy/dx = 2(x²) * 2x = 4x³ For x < 0, d/dx (x|x|) = 0 dy/dx = 2((-x)²) * 0 = 0

 

Hence proved.

Explanation

In this step-by-step process, we used the chain rule to differentiate the equation. We replace d/dx (x|x|) with its piecewise derivative and simplify the result.

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 5

Solve: d/dx (x|x|/x)

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

To differentiate the function, we use simplification: d/dx (x|x|/x) = d/dx (|x|) For x > 0, |x| = x d/dx (|x|) = 1 For x < 0, |x| = -x d/dx (|x|) = -1

 

Therefore, d/dx (x|x|/x) = 1 for x > 0, -1 for x < 0

Explanation

In this process, we simplify the given function to |x| and differentiate based on the piecewise definition of the absolute value.

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Ray Thinking Deeply About Math Problems

FAQs on the Derivative of x|x|

1.Find the derivative of x|x|.

Using the piecewise definition: d/dx (x|x|) = 2x for x > 0 and 0 for x < 0.

Math FAQ Answers Dropdown Arrow

2.Can we use the derivative of x|x| in real life?

Yes, we can use the derivative of x|x| in real life in calculating the rate of change of any motion, especially in fields such as physics and engineering.

Math FAQ Answers Dropdown Arrow

3.Is it possible to take the derivative of x|x| at the point where x = 0?

No, x = 0 is a point where x|x| is non-differentiable, so it is impossible to take the derivative at this point.

Math FAQ Answers Dropdown Arrow

4.What rule is used to differentiate x|x|?

We use piecewise differentiation and potentially the chain rule to differentiate x|x|, considering the definition of the absolute value.

Math FAQ Answers Dropdown Arrow

5.Are the derivatives of x|x| and |x| the same?

No, they are different. The derivative of x|x| is 2x for x > 0 and 0 for x < 0, while the derivative of |x| is x/|x| for x ≠ 0.

Math FAQ Answers Dropdown Arrow
Professor Greenline from BrightChamps

Important Glossaries for the Derivative of x|x|

  • Derivative: The derivative of a function indicates how the given function changes in response to a slight change in x.

 

  • Absolute Value: A function that gives the non-negative value of a number or expression, represented by |x|.

 

  • Piecewise Function: A function defined by different expressions based on different intervals of the domain.

 

  • First Principle: A fundamental approach to finding the derivative using limits.

 

  • Chain Rule: A rule for differentiating compositions of functions.
Math Teacher Background Image
Math Teacher Image

Jaskaran Singh Saluja

About the Author

Jaskaran Singh Saluja is a math wizard with nearly three years of experience as a math teacher. His expertise is in algebra, so he can make algebra classes interesting by turning tricky equations into simple puzzles.

Max, the Girl Character from BrightChamps

Fun Fact

: He loves to play the quiz with kids through algebra to make kids love it.

INDONESIA - Axa Tower 45th floor, JL prof. Dr Satrio Kav. 18, Kel. Karet Kuningan, Kec. Setiabudi, Kota Adm. Jakarta Selatan, Prov. DKI Jakarta
INDIA - H.No. 8-2-699/1, SyNo. 346, Rd No. 12, Banjara Hills, Hyderabad, Telangana - 500034
SINGAPORE - 60 Paya Lebar Road #05-16, Paya Lebar Square, Singapore (409051)
USA - 251, Little Falls Drive, Wilmington, Delaware 19808
VIETNAM (Office 1) - Hung Vuong Building, 670 Ba Thang Hai, ward 14, district 10, Ho Chi Minh City
VIETNAM (Office 2) - 143 Nguyễn Thị Thập, Khu đô thị Him Lam, Quận 7, Thành phố Hồ Chí Minh 700000, Vietnam
UAE - BrightChamps, 8W building 5th Floor, DAFZ, Dubai, United Arab Emirates
UK - Ground floor, Redwood House, Brotherswood Court, Almondsbury Business Park, Bristol, BS32 4QW, United Kingdom